<?php

Route::group(['prefix'=>'Admin'], function () {

    //验证码
    Route::get('/code/{tmp}','Backstage\PublicController@code')->name('admin_code');

    Route::post('/upload/img', 'Backstage\PublicController@uploadimg')->name('admin_upload_img');
    //屏幕锁
    Route::any('/lockscreen', 'Backstage\PublicController@lockScreen')->name('admin_lockscreen');
    Route::post('/lock', 'Backstage\PublicController@lock')->name('admin_lock');
    //adminlog分页
    Route::post('/upload/adminlog', 'Backstage\PublicController@adminlog')->name('admin_upload_adminlog');

    Route::get('/index.html', 'Backstage\IndexController@index')->name('admin_index');

    Route::any('/upuserdata.html', 'Backstage\IndexController@save')->name('admin_index_upuserdata');

    //登录页面
    Route::group(['prefix'=>'Login'], function () {

        Route::get('/index.html', 'Backstage\LoginController@index')->name('admin_login_index');
        //退出登录
        Route::post('/quit.html', 'Backstage\PublicController@quit')->name('admin_login_quit');
        //登录操作
        Route::post('/login.html', 'Backstage\LoginController@login')->name('admin_login_login');

        Route::match(array('post','get'),'/forgotpassmail.html', 'Backstage\LoginController@forgotPassMail')->name('admin_login_forgotpassmail');

        Route::match(array('post','get'),'/resetpass.html', 'Backstage\LoginController@resetPass')->name('admin_login_resetpass');

    });

//----------------角色----------------------

    Route::group(['prefix'=>'AdminRole'], function () {
        //角色管理列表
        Route::match(array('post','get'),'/index.html', 'Backstage\AdminRoleController@index')->name('admin_role_index');
        //角色编辑创建
        Route::match(array('post','get'),'/save.html', 'Backstage\AdminRoleController@save')->name('admin_role_save');
        //角色删除
        Route::post('/del.html', 'Backstage\AdminRoleController@del')->name('admin_role_del');
        //角色删除
        Route::post('/status.html', 'Backstage\AdminRoleController@status')->name('admin_role_status');
    });

//----------------角色----------------------

//----------------账号管理-------------------------
    Route::group(['prefix'=>'AdminUser'], function () {
        Route::match(array('post','get'),'/index.html', 'Backstage\AdminUserController@index')->name('admin_user_index');
        //角色编辑创建
        Route::match(array('post','get'),'/save.html', 'Backstage\AdminUserController@save')->name('admin_user_save');
        //角色删除
        Route::post('/del.html', 'Backstage\AdminUserController@del')->name('admin_user_del');
        //账号删除
        Route::post('/status.html', 'Backstage\AdminUserController@status')->name('admin_user_status');
        //账号修改角色
        Route::post('/rolestatus.html', 'Backstage\AdminUserController@roleStatus')->name('admin_user_rolestatus');
    });
//----------------账号管理-------------------------


//----------------节点管理-------------------------
    Route::group(['prefix'=>'AdminNote'], function () {
        Route::match(array('post','get'),'/index.html', 'Backstage\AdminNoteController@index')->name('admin_note_index');
        //节点编辑创建
        Route::match(array('post','get'),'/save.html', 'Backstage\AdminNoteController@save')->name('admin_note_save');
        //节点删除
        Route::post('/del.html', 'Backstage\AdminNoteController@del')->name('admin_note_del');

    });





});